package com.alog.storage;

import android.app.Activity;
import android.app.Application;
import android.graphics.Bitmap;
import java.util.ArrayList;
import java.util.List;

public class StorageApplication extends Application {
    public static List<Activity> activityList = new ArrayList<>();
    public Bitmap bgBitmap;

    @Override
    public void onCreate() {
        super.onCreate();
    }

    public void setBgBitmap(Bitmap bitmap) {
        this.bgBitmap = bitmap;
    }

    public void clearBgBitmap() {
//        if (bgBitmap != null) {
//            bgBitmap.recycle();
//            bgBitmap = null;
//        }
    }

    public static void exit() {
        int count = activityList.size();
        for (int i = 0; i < count; i++) {
            activityList.get(i).finish();
        }
        System.exit(0);
    }

}
